<template>
  <el-dialog
    :modal="false"
    :close-on-click-modal="false"
    width="70%"
    :visible.sync="visible"
  >
  <el-button type="primary"  v-print ="'#fxjAPdf3'">打印</el-button>
    <div ref="fxjAPdf3" id="fxjAPdf3">
    <div class="title">军队无军籍退休职工一次性抚恤金构成表</div>
    <div class="title1">（1993年10月至2003年6月退休机关职员）</div>
    <div style="width:100%;height:20px">
    <div style="display: inline-block;margin-left:2%">管理单位：盖章</div>
    <div style="display: inline-block;margin-left:62%;">编码：{{dataForm.personalCode}}</div>
    </div>
    <!-- <div class="cont"> -->
      <!-- 第一行表格 五列 -->
      <div class="table">
          <div class="box">
            <div class="content1">姓名</div>
            <div class="content_border">{{dataForm.name}}</div>
            <div class="content1">性别</div>
            <div class="content_border">{{dataForm.sex}}</div>
            <div class="content1">出生年月</div>
            <div class="content_border">{{dataForm.birthDate}}</div>
            <div class="content1">参加工作时间</div>
            <div class="content_border">{{dataForm.workTime}}</div>
            <div class="content1">退休时间</div>
            <div class="content_border" style="border-right: 1px solid #e9e9e9;">{{dataForm.retirementTime}}</div>
          </div>
      </div>
      <!-- 第二行表格 三列 2-4 -->
      <div class="table">
          <div class="box">
            <div class="content1">职务</div>
            <div class="content_border">{{dataForm.duties}}</div>
            <div class="content1">工资等级</div>
            <div class="content_border" style="width:160%">{{dataForm.wageScale}}</div>
            <div class="content1">原部队</div>
            <div class="content_border">{{dataForm.originalTroops}}</div>
            <div class="content1" >移交时间</div>
            <div class="content_border" style="border-right: 1px solid #e9e9e9;">{{dataForm.handoverTime}}</div>
        </div>
      </div>
      <div class="table">
          <div class="box">
            <div class="content1">工作年限</div>
            <div class="content_border">{{dataForm.workingYears}}</div>
            <div class="content1">军队工作年限</div>
            <div class="content_border">{{dataForm.workingYearsArmy}}</div>
            <div class="content1" style="width:100%">教（护）龄</div>
            <div class="content_border" style="width:200%;border-right: 1px solid #e9e9e9;">{{dataForm.teachingAge}}</div>
        </div>
      </div>
      <div class="table">
          <div class="box" >
            <div class="content1" style="width:100%;border-right: 1px solid #e9e9e9;;font-size: 18px;font-weight: 600;">退休费基数</div> 
          </div>
          <div class="box">
            <div class="content1" style="width:100%">工龄工资</div>
            <div class="content_border" style="width:100%">{{dataForm.senioritySalary}}</div>
            <div class="content1" style="width:100%">基础工资</div>
            <div class="content_border" style="width:100%;">{{dataForm.basicSalary}}</div>
            <div class="content1" style="width:120%">岗位（级别）标准工资</div>
            <div class="content_border" style="width:80%;border-right: 1px solid #e9e9e9;" >{{dataForm.gradeSalary}}</div> 
          </div>
          <div class="box">
            <div class="content1" style="width:100%">级别工资</div>
            <div class="content_border" style="width:100%">{{dataForm.levelSalary}}</div>
            <div class="content1" style="width:100%">奖金津贴</div>
            <div class="content_border" style="width:100%;" >{{dataForm.bonusAllowance}}</div> 
            <div class="content1" style="width:120%">发至退休当年职务补贴</div>
            <div class="content_border" style="width:80%;border-right: 1px solid #e9e9e9;">{{dataForm.totalSubsidy}}</div>
          </div>
          <div class="box">
            <div class="content1" style="width:100%">军队服务津贴</div>
            <div class="content_border" style="width:100%">{{dataForm.serviceAllowance}}</div>
            <div class="content1" style="width:100%">基本退休费计发比例</div>
            <div class="content_border" style="width:100%;" >{{dataForm.retirementFeeProportion}}</div> 
            <div class="content1" style="width:120%">基本退休费折扣合计：</div>
            <div class="content_border" style="width:80%;border-right: 1px solid #e9e9e9;">{{dataForm.sumTxfjs}}</div> 
          </div>
      </div>
      <div class="table">
          <div class="box" >
            <div class="content1" style="width:100%;border-right: 1px solid #e9e9e9;;font-size: 18px;font-weight: 600;">历次增加的退休费</div> 
          </div>
          <div class="box" >
            <div class="content1" style="width:140%">1995年10月增加退休费</div>
            <div class="content_border" style="width:60%" >{{dataForm.retirementPayNinetyfive}}</div> 
            <div class="content1" style="width:140%;">1997年10月增加退休费</div>
            <div class="content_border" style="width:60%">{{dataForm.retirementPayNinetysesec}}</div>
            <div class="content1" style="width:140%">1999年10月增加退休费</div>
            <div class="content_border" style="width:60%;border-right: 1px solid #e9e9e9;">{{dataForm.retirementPayNinetynisec}}</div>
          </div>
          <div class="box" >
            <div class="content1" style="width:140%">1997年7月增加退休费</div>
            <div class="content_border" style="width:60%">{{dataForm.retirementPayNinetyseven}}</div>
            <div class="content1" style="width:140%">1999年7月增加退休费</div>
            <div class="content_border" style="width:60%" >{{dataForm.retirementPayNinetynine}}</div> 
            <div class="content1" style="width:140%">2001年10月增加退休费</div>
            <div class="content_border" style="width:60%;border-right: 1px solid #e9e9e9;" >{{dataForm.retirementPayOnsec}}</div> 
          </div>
        
          <div class="box" >
            <div class="content1" style="width:140%;">2003年10月增加退休费</div>
            <div class="content_border" style="width:60%">{{dataForm.retirementPayThisec}}</div>
            <div class="content1" style="width:140%">2005年10月增加退休费</div>
            <div class="content_border" style="width:60%">{{dataForm.retirementPayFive}}</div>
            <div class="content1" style="width:140%;">2001年1月增加退休费</div>
            <div class="content_border" style="width:60%">{{dataForm.retirementPayOne}}</div>
          </div>
          <div class="box" >
            <div class="content1" style="width:140%;">2006年7月增加退休费</div>
            <div class="content_border" style="width:60%">{{dataForm.retirementPaySix}}</div>
            <div class="content1" style="width:140%">2001年10月新增退休费</div>
            <div class="content_border" style="width:60%">{{dataForm.retirementPayOnenew}}</div>
            <div class="content1" style="width:140%">2003年7月增加退休费</div>
            <div class="content_border" style="width:60%;border-right: 1px solid #e9e9e9;" >{{dataForm.retirementPayThird}}</div> 
          </div>
          <div class="box" > 
            <div class="content1" style="width:140%">2014年10月增加退休费</div>
            <div class="content_border" style="width:60%">{{dataForm.retirementPayFourty}}</div>
            <div class="content1" style="width:140%">2000年1月增加退休费</div>
            <div class="content_border" style="width:60%">{{dataForm.retirementPayZero}}</div>
            <div class="content1" style="width:140%">历次增加的退休费合计：</div>
            <div class="content_border" style="width:60%;border-right: 1px solid #e9e9e9;" >{{dataForm.lczjtxfhjsl}}</div> 
          </div>
      </div>
      <!-- <div class="table">
          <div class="box" >
            <div class="content1" style="width:100%;border-right: 1px solid #e9e9e9;;font-size: 18px;font-weight: 600;">价格生活补贴</div> 
          </div>
          <div class="box" >
            <div class="content1" style="width:80%">1991年粮油补贴</div>
            <div class="content_border" style="width:120%;" >{{dataForm.oilAllowanceNightyone}}</div> 
            <div class="content1" style="width:80%;text-align:right">价格生活补贴合计：</div>
            <div class="content_border" style="width:120%;border-right: 1px solid #e9e9e9;">{{dataForm.jgshbthjsl}}</div> 
          </div>
      </div> -->
      <div class="table">
          <div class="box" >
            <div class="content1" style="width:100%;border-right: 1px solid #e9e9e9;;font-size: 18px;font-weight: 600;">生活机制补贴</div> 
          </div>
          <div class="box" >
            <div class="content1" style="width:140%;">1996年增加生活补贴</div>
            <div class="content_border" style="width:60%">{{dataForm.livingAllowanceNightysix}}</div>
            <div class="content1" style="width:140%">1997年增加生活补贴</div>
            <div class="content_border" style="width:60%">{{dataForm.livingAllowanceNightysev}}</div>
            <div class="content1" style="width:140%">1998年增加生活补贴</div>
            <div class="content_border" style="width:60%;border-right: 1px solid #e9e9e9;" >{{dataForm.livingAllowanceNightyeig}}</div> 
          </div>
          <div class="box" >
            <div class="content1" style="width:140%;">1999年增加生活补贴</div>
            <div class="content_border" style="width:60%">{{dataForm.livingAllowanceNightynig}}</div>
            <div class="content1" style="width:140%">2000年增加生活补贴</div>
            <div class="content_border" style="width:60%">{{dataForm.livingAllowanceZero}}</div>
            <div class="content1" style="width:140%">2001年增加生活补贴</div>
            <div class="content_border" style="width:60%;border-right: 1px solid #e9e9e9;" >{{dataForm.livingAllowanceOne}}</div> 
          </div>
          <div class="box" >
            <div class="content1" style="width:140%;">2002年增加生活补贴</div>
            <div class="content_border" style="width:60%">{{dataForm.livingAllowanceTwo}}</div>
            <div class="content1" style="width:140%">2003年增加机制补贴</div>
            <div class="content_border" style="width:60%">{{dataForm.livingAllowanceThird}}</div>
            <div class="content1" style="width:140%">2004年增加机制补贴</div>
            <div class="content_border" style="width:60%;border-right: 1px solid #e9e9e9;" >{{dataForm.livingAllowanceFour}}</div> 
          </div>
          <div class="box" >
            <div class="content1" style="width:120%;text-align: right;">增加机制补贴合计：</div>
            <div class="content_border" style="width:60%;border-right: 1px solid #e9e9e9;" >{{this.resultD}}</div> 
          </div>
      </div>
      <div class="table">
          <div class="box" >
            <div class="content1" style="width:100%;border-right: 1px solid #e9e9e9;;font-size: 18px;font-weight: 600;">合计</div> 
          </div>
          <div class="box">
            <div class="content1">退休费合计：</div>
            <div class="content_border">{{dataForm.zdsctxfsl}}</div>
            <div class="content1">丧葬费：</div>
            <div class="content_border" style="border-right: 1px solid #e9e9e9;">5000.00</div>
          </div>
          <div class="box">
            <div class="content1">抚恤金合计:</div>
            <div class="content_border">{{dataForm.fxjSum}}</div>
            <div class="content1">大写:</div>
            <div class="content_border" style="border-right: 1px solid #e9e9e9;">{{dataForm.dx}}</div>
          </div>
      </div>
      <div class="table">
          <div class="box" >
            <div class="content1" style="width:100%;text-align: left;border-right: 1px solid #e9e9e9;;font-size: 14px;font-weight: 400;">注：一次性抚恤金从2004年10月1日起调整为：本人生前20个月基本退休费和历次按国家规定增加退休费之和</div> 
          </div>
      </div>
  </div>
    
  </el-dialog>
  
</template>
<script>

import html2canvas from 'html2canvas' // 转为图片
import printJS from 'print-js' // 打印
import print from 'vue-print-nb';
export default {
  data() {
    return {
      logoutDateDisabled: false,
      deathDisabled: false,
      deathTimeDisabled: false,
      postLevel: false,
      salaryClass: false,
      allowanceRatioClass: false,
      wageGradeClass: false,
      rensonClass: false,
      activeName: "first",
      visible: false,
      isTitle: "",
      isDisabled: false,
      visibleLine:"",
      isDisabled2:false,
      sfxs:"none",
      dataForm: {
        
        id: 0,
        areaCode: "",
        personalCode: "",
        name: "",
        sex: "",
        nation: "",
        politicalFace: "",
        idNo: "",
        birthDate: "",
        workTime: "",
        retirementTime: "",
        retirementStatus: "",
        duties: "",
        county: "",
        street: "",
        community: "",
        originalTroops: "",
        handoverPeriod: "",
        handoverTime: "",
        handoverMode: "",
        handoverBatch: "",
        workersClassification: "",
        reception: "",
        myStatus: "",
        inOutTime: "",
        deathTime: "",
        housingSituation: "",
        housingPropertyRight: "",
        leaseholder: "",
        housingArea: "",
        increasePension: "",
        totalMonthlyPension: "",
        death: "",
        workUnit: "",
        address: "",
        phone: "",
        remarks: "",
        workingYears: "",
        yuYue: "",
        workingYearsArmy: "",
        teachingAge: "",
        wageLevel: "",
        wageGrade: "",
        wageScale: "",
        treatmentStandard: "",
        personnelClassification: "",
        enjoyAllowance: "",
        specialAllowance: "",
        increaseProportion: "",
        renson: "",
        allowanceRatio: "",
        postLevel: "",
        salary: "",
        isImprove: "",
        retirementFeeProportion: "",
        senioritySalary: "",
        basicSalary: "",
        levelSalary: "",
        gradeSalary: "",
        salaryScale: "",
        bonusAllowance: "",
        serviceAllowance: "",
        seniorityAllowance: "",
        totalSubsidy: "",
        specialTeacherSubsidy: "",
        difficultySubsidy: "",
        raiseWages: "",
        retirementPayEightynine: "",
        retirementPayNinetytwo: "",
        retirementPayFirst: "",
        retirementPaySecond: "",
        retirementPayNinetyfive: "",
        retirementPayNinetyseven: "",
        retirementPayNinetysesec: "",
        retirementPayNinetynine: "",
        retirementPayNinetynisec: "",
        retirementPayZero: "",
        retirementPayOne: "",
        retirementPayOnenew: "",
        retirementPayOnsec: "",
        retirementPayThird: "",
        retirementPayThisec: "",
        retirementPayFive: "",
        retirementPaySix: "",
        foodAllowanceSeventynine: "",
        foodAllowanceEightyeight: "",
        oilAllowanceNightyone: "",
        oilAllowanceNightytwo: "",
        fuelLlowance: "",
        meatLlowance: "",
        oilAllowanceNightythird: "",
        livingAllowanceEightyfive: "",
        livingAllowanceEightyei: "",
        livingAllowanceNightytw: "",
        livingAllowanceNightyfo: "",
        livingAllowanceNightyfive: "",
        livingAllowanceNightysix: "",
        livingAllowanceNightysev: "",
        livingAllowanceNightyeig: "",
        livingAllowanceNightynig: "",
        livingAllowanceZero: "",
        livingAllowanceOne: "",
        livingAllowanceTwo: "",
        livingAllowanceThird: "",
        livingAllowanceFour: "",
        livingAllowanceSeven: "",
        specialGoveAllowanc: "",
        paperMoney: "",
        housingSubsidy: "",
        bathSubsidy: "",
        honorAllowance: "",
        otherIncome: "",
        jobSubsidy: "",
        ageAllowance: "",
        holidaySubsidy: "",
        retirementAllowanceOneo: "",
        growthMechanismSubsidy: "",
        workingYearsSubsidy: "",
        proportionalSubsidy: "",
        retirementAllowanceOneth: "",
        growthMechanismThirty: "",
        retirementAllowanceThirty: "",
        retirementPayFourty: "",
        logoutDate: "",
        heatingSubsidy: "",
        serviceSubsidy: "",
        pensionSixteen: "",
        pensionSeventeen: "",
        pensionEighteen: "",
        pensionNineteen: "",
        adjustTreatment: "",
        basicPension: "",
        pensionTwenty: "",
        pensionTwentyone: "",
        personType: "",
        ext1: "",
        ext3: "",
        lczjtxfhjsl:0,
        jgshbthjsl:0,
        zdsctxfsl:0,
        fxjSum:0,
        dx: "",
        sumTxfjs:0,
      },
      dataRule: {
        
      },
    };
  },
  created() {
        
  },
  computed: {
   //退休费基数
    resultA() {
      //不计算比例
      let basicSalary = this.dataForm.basicSalary; //基础工资
      let senioritySalary = this.dataForm.senioritySalary; //工龄工资
      let seniorityAllowance = this.dataForm.seniorityAllowance; //教护龄津贴
      let difficultySubsidy = this.dataForm.difficultySubsidy; //困难补助
      let specialTeacherSubsidy = this.dataForm.specialTeacherSubsidy; //特级老师补贴
      //计算比例
      let salaryScale = this.dataForm.salaryScale; //薪级工资
      let raiseWages = this.dataForm.raiseWages; //提高工资10%
      let serviceAllowance = this.dataForm.serviceAllowance; //军队服务津贴
      let gradeSalary = this.dataForm.gradeSalary; //岗位工资(标准工资)
      let levelSalary = this.dataForm.levelSalary; //级别工资
      let bonusAllowance = this.dataForm.bonusAllowance; //奖金津贴

      let txfjfbl = this.dataForm.retirementFeeProportion;//退休费计发比例
      let tgblbf = this.dataForm.increaseProportion;//提高比例部分
      let gzsftg = this.dataForm.isImprove//工资是否提高10%
      let gzsftgValue = '';
      if(txfjfbl === null || txfjfbl === "")
      {
        txfjfbl = 0;
      }
      if(tgblbf === null || tgblbf === "")
      {
        tgblbf = 0;
      }
      if(gzsftg == "是")
      {
          gzsftgValue = 10;
      }else{
        gzsftgValue = 0
      }
      txfjfbl = parseFloat(txfjfbl)+parseFloat(tgblbf)+parseFloat(gzsftgValue);
      
      let sumBasicRe = 0;
      if (salaryScale !== "" && salaryScale !== null) {
        sumBasicRe = sumBasicRe + parseFloat(salaryScale);
      }
      if (raiseWages !== "" && raiseWages !== null) {
        sumBasicRe = sumBasicRe + parseFloat(raiseWages);
      }
      if (serviceAllowance !== "" && serviceAllowance !== null) {
        sumBasicRe = sumBasicRe + parseFloat(serviceAllowance);
      }
      if (gradeSalary !== "" && gradeSalary !== null) {
        sumBasicRe = sumBasicRe + parseFloat(gradeSalary);
      }
      if (levelSalary !== "" && levelSalary !== null) {
        sumBasicRe = sumBasicRe + parseFloat(levelSalary);
      }
      if (bonusAllowance !== "" && bonusAllowance !== null) {
        sumBasicRe = sumBasicRe + parseFloat(bonusAllowance);
      }
        let bl = parseFloat(txfjfbl)/100;
        //sumBasicRe = sumBasicRe * bl;
        sumBasicRe = Math.ceil(sumBasicRe * bl);

     
      if (basicSalary !== "" && basicSalary !== null) {
        sumBasicRe = sumBasicRe + parseFloat(basicSalary);
      }
      if (difficultySubsidy !== "" && difficultySubsidy !== null) {
        sumBasicRe = sumBasicRe + parseFloat(difficultySubsidy);
      }
      if (senioritySalary !== "" && senioritySalary !== null) {
        sumBasicRe = sumBasicRe + parseFloat(senioritySalary);
      }
      if (seniorityAllowance !== "" && seniorityAllowance !== null) {
        sumBasicRe = sumBasicRe + parseFloat(seniorityAllowance);
      }
      if (specialTeacherSubsidy !== "" && specialTeacherSubsidy !== null) {
        sumBasicRe = sumBasicRe + parseFloat(specialTeacherSubsidy);
      }
      
      
      return parseFloat(sumBasicRe).toFixed(2);
    },
    //历次增加的退休费合计
    resultB() {
      let retirementPayEightynine = this.dataForm.retirementPayEightynine; //1989年10月增加退休费
      let retirementPayNinetyfive = this.dataForm.retirementPayNinetyfive; //1995年10月增加退休费
      let retirementPayNinetynisec = this.dataForm.retirementPayNinetynisec; //1999年10月增加退休费
      let retirementPayThisec = this.dataForm.retirementPayThisec; //2003年10月增加退休费
      let retirementPayFirst = this.dataForm.retirementPayFirst; //1993年10月第一步增加退休费
      let retirementPayNinetyseven = this.dataForm.retirementPayNinetyseven; //1997年7月增加退休费
      let retirementPayOne = this.dataForm.retirementPayOne; //2001年1月增加退休费
      let retirementPayThird = this.dataForm.retirementPayThird; //2003年7月增加退休费
      let retirementPayFourty = this.dataForm.retirementPayFourty; //2014年10月增加退休费
      let retirementPayNinetytwo = this.dataForm.retirementPayNinetytwo; //1992年3月提高退休费10％
      let retirementPayNinetysesec = this.dataForm.retirementPayNinetysesec; //1997年10月增加退休费
      let retirementPayOnsec = this.dataForm.retirementPayOnsec; //2001年10月增加退休费
      let retirementPayFive = this.dataForm.retirementPayFive; //2005年10月增加退休费
      let retirementPaySecond = this.dataForm.retirementPaySecond; //1993年10月第二步增加退休费
      let retirementPayNinetynine = this.dataForm.retirementPayNinetynine; //1999年7月增加退休费
      let retirementPayOnenew = this.dataForm.retirementPayOnenew; //2001年10月新增退休费
      let retirementPaySix = this.dataForm.retirementPaySix; //2006年7月增加退休费
      let sumAddRe = 0;
      if (retirementPayEightynine !== "" && retirementPayEightynine !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPayEightynine);
      }
      if (retirementPayNinetyfive !== "" && retirementPayNinetyfive !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPayNinetyfive);
      }
      if (retirementPayNinetynisec !== "" && retirementPayNinetynisec !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPayNinetynisec);
      }
      if (retirementPayThisec !== "" && retirementPayThisec !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPayThisec);
      }
      if (retirementPayFirst !== "" && retirementPayFirst !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPayFirst);
      }
      if (retirementPayNinetyseven !== "" && retirementPayNinetyseven !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPayNinetyseven);
      }
      if (retirementPayOne !== "" && retirementPayOne !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPayOne);
      }
      if (retirementPayThird !== "" && retirementPayThird !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPayThird);
      }
      if (retirementPayFourty !== "" && retirementPayFourty !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPayFourty);
      }
      if (retirementPayNinetytwo !== "" && retirementPayNinetytwo !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPayNinetytwo);
      }
      if (retirementPayNinetysesec !== "" && retirementPayNinetysesec !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPayNinetysesec);
      }
      if (retirementPayOnsec !== "" && retirementPayOnsec !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPayOnsec);
      }
      if (retirementPayFive !== "" && retirementPayFive !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPayFive);
      }
      if (retirementPaySecond !== "" && retirementPaySecond !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPaySecond);
      }
      if (retirementPayNinetynine !== "" && retirementPayNinetynine !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPayNinetynine);
      }
      if (retirementPayOnenew !== "" && retirementPayOnenew !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPayOnenew);
      }
      if (retirementPaySix !== "" && retirementPaySix !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPaySix);
      }
      return parseFloat(sumAddRe).toFixed(2);
    },
    //价格生活补贴合计
    resultC() {
      let foodAllowanceSeventynine = this.dataForm.foodAllowanceSeventynine; //1979年副食补贴
      let oilAllowanceNightyone = this.dataForm.oilAllowanceNightyone; //1991年粮油补贴
      let fuelLlowance = this.dataForm.fuelLlowance; //1992年燃料补贴
      let oilAllowanceNightythird = this.dataForm.oilAllowanceNightythird; //1993年粮油补贴
      let livingAllowanceEightyei = this.dataForm.livingAllowanceEightyei; //1988年生活补贴
      let livingAllowanceNightyfo = this.dataForm.livingAllowanceNightyfo; //1994年生活补贴
      let foodAllowanceEightyeight = this.dataForm.foodAllowanceEightyeight; //1988年副食补贴
      let oilAllowanceNightytwo = this.dataForm.oilAllowanceNightytwo; //1992年粮油补贴
      let meatLlowance = this.dataForm.meatLlowance; //1992年蛋肉菜补贴
      let livingAllowanceEightyfive = this.dataForm.livingAllowanceEightyfive; //1985年生活补贴
      let livingAllowanceNightytw = this.dataForm.livingAllowanceNightytw; //1992年生活补贴
      let livingAllowanceNightyfive = this.dataForm.livingAllowanceNightyfive; //1995年生活补贴
      let sumPrice = 0;
      if (foodAllowanceSeventynine !== "" && foodAllowanceSeventynine !== null) {
        sumPrice = sumPrice + parseFloat(foodAllowanceSeventynine);
      }
      if (oilAllowanceNightyone !== "" && oilAllowanceNightyone !== null) {
        sumPrice = sumPrice + parseFloat(oilAllowanceNightyone);
      }
      if (fuelLlowance !== "" && fuelLlowance !== null) {
        sumPrice = sumPrice + parseFloat(fuelLlowance);
      }
      if (oilAllowanceNightythird !== "" && oilAllowanceNightythird !== null) {
        sumPrice = sumPrice + parseFloat(oilAllowanceNightythird);
      }
      if (livingAllowanceEightyei !== "" && livingAllowanceEightyei !== null) {
        sumPrice = sumPrice + parseFloat(livingAllowanceEightyei);
      }
      if (livingAllowanceNightyfo !== "" && livingAllowanceNightyfo !== null) {
        sumPrice = sumPrice + parseFloat(livingAllowanceNightyfo);
      }
      if (foodAllowanceEightyeight !== "" && foodAllowanceEightyeight !== null) {
        sumPrice = sumPrice + parseFloat(foodAllowanceEightyeight);
      }
      if (oilAllowanceNightytwo !== "" && oilAllowanceNightytwo !== null) {
        sumPrice = sumPrice + parseFloat(oilAllowanceNightytwo);
      }
      if (meatLlowance !== "" && meatLlowance !== null) {
        sumPrice = sumPrice + parseFloat(meatLlowance);
      }
      if (livingAllowanceEightyfive !== "" && livingAllowanceEightyfive !== null) {
        sumPrice = sumPrice + parseFloat(livingAllowanceEightyfive);
      }
      if (livingAllowanceNightytw !== "" && livingAllowanceNightytw !== null) {
        sumPrice = sumPrice + parseFloat(livingAllowanceNightytw);
      }
      if (livingAllowanceNightyfive !== "" && livingAllowanceNightyfive !== null) {
        sumPrice = sumPrice + parseFloat(livingAllowanceNightyfive);
      }
      return parseFloat(sumPrice).toFixed(2);
    },
    //增加生活机制（补贴）合计
    resultF() {
      let livingAllowanceSeven = this.dataForm.livingAllowanceSeven; //2007年增加生活补贴
      let jobSubsidy = this.dataForm.jobSubsidy; //2010年职务补贴
      let ageAllowance = this.dataForm.ageAllowance; //2010年年龄补贴
      let retirementAllowanceOneo = this.dataForm.retirementAllowanceOneo; //2011年退休补贴
      let workingYearsSubsidy = this.dataForm.workingYearsSubsidy; //2012年工作年限补贴
      let proportionalSubsidy = this.dataForm.proportionalSubsidy; //2012年提高比例补贴
      let growthMechanismThirty = this.dataForm.growthMechanismThirty; //2013年增长机制补贴
      let retirementAllowanceOneth = this.dataForm.retirementAllowanceOneth; //2013年退休补贴
      //let basicPension = this.dataForm.basicPension;//2019年基本养老金
      let retirementAllowanceThirty = this.dataForm.retirementAllowanceThirty; //2014年退休补贴
      let pensionSixteen = this.dataForm.pensionSixteen; //2016年增加养老金
      let pensionSeventeen = this.dataForm.pensionSeventeen; //2017年增加养老金
      let pensionEighteen = this.dataForm.pensionEighteen; //2018年增加养老金
      let pensionNineteen = this.dataForm.pensionNineteen; //2019年增加养老金
      let adjustTreatment = this.dataForm.adjustTreatment; //2019年1月调整待遇
      let pensionTwenty = this.dataForm.pensionTwenty; //2020年增加养老金
      let pensionTwentyone = this.dataForm.pensionTwentyone; //2021年增加养老金
      let ext1 = this.dataForm.ext1;//2022年增加养老金
      let sumMeleft = 0;
      if (livingAllowanceSeven !== "" && livingAllowanceSeven !== null) {
        sumMeleft = sumMeleft + parseFloat(livingAllowanceSeven);
      }
      if (jobSubsidy !== "" && jobSubsidy !== null) {
        sumMeleft = sumMeleft + parseFloat(jobSubsidy);
      }
      if (ageAllowance !== "" && ageAllowance !== null) {
        sumMeleft = sumMeleft + parseFloat(ageAllowance);
      }
      if (retirementAllowanceOneo !== "" && retirementAllowanceOneo !== null) {
        sumMeleft = sumMeleft + parseFloat(retirementAllowanceOneo);
      }
      if (workingYearsSubsidy !== "" && workingYearsSubsidy !== null) {
        sumMeleft = sumMeleft + parseFloat(workingYearsSubsidy);
      }
      if (proportionalSubsidy !== "" && proportionalSubsidy !== null) {
        sumMeleft = sumMeleft + parseFloat(proportionalSubsidy);
      }
      if (growthMechanismThirty !== "" && growthMechanismThirty !== null) {
        sumMeleft = sumMeleft + parseFloat(growthMechanismThirty);
      }
      if (retirementAllowanceOneth !== "" && retirementAllowanceOneth !== null) {
        sumMeleft = sumMeleft + parseFloat(retirementAllowanceOneth);
      }
      if (retirementAllowanceThirty !== "" && retirementAllowanceThirty !== null) {
        sumMeleft = sumMeleft + parseFloat(retirementAllowanceThirty);
      }
      if (pensionSixteen !== "" && pensionSixteen !== null) {
        sumMeleft = sumMeleft + parseFloat(pensionSixteen);
      }
      if (pensionSeventeen !== "" && pensionSeventeen !== null) {
        sumMeleft = sumMeleft + parseFloat(pensionSeventeen);
      }
      if (pensionEighteen !== "" && pensionEighteen !== null) {
        sumMeleft = sumMeleft + parseFloat(pensionEighteen);
      }
      if (pensionNineteen !== "" && pensionNineteen !== null) {
        sumMeleft = sumMeleft + parseFloat(pensionNineteen);
      }
      if (adjustTreatment !== "" && adjustTreatment !== null) {
        sumMeleft = sumMeleft + parseFloat(adjustTreatment);
      }
      if (pensionTwenty !== "" && pensionTwenty !== null) {
        sumMeleft = sumMeleft + parseFloat(pensionTwenty);
      }
      if (pensionTwentyone !== "" && pensionTwentyone !== null) {
        sumMeleft = sumMeleft + parseFloat(pensionTwentyone);
      }
      if (ext1 !== "" && ext1 !== null) {
        sumMeleft = sumMeleft + parseFloat(ext1);
      }
      return parseFloat(sumMeleft).toFixed(2);
    },
    //其它合计
    resultG() {
      let paperMoney = this.dataForm.paperMoney; //书报费
      let bathSubsidy = this.dataForm.bathSubsidy; //洗理费
      let housingSubsidy = this.dataForm.housingSubsidy; //住房补贴
      let otherIncome = this.dataForm.otherIncome; //其它收入
      let honorAllowance = this.dataForm.honorAllowance; //荣誉津贴
      let serviceSubsidy = this.dataForm.serviceSubsidy; //物业服务补贴
      let sumOther = 0;
      if (paperMoney !== "" && paperMoney !== null) {
        sumOther = sumOther + parseFloat(paperMoney);
      }
      if (bathSubsidy !== "" && bathSubsidy !== null) {
        sumOther = sumOther + parseFloat(bathSubsidy);
      }
      if (housingSubsidy !== "" && housingSubsidy !== null) {
        sumOther = sumOther + parseFloat(housingSubsidy);
      }
      if (otherIncome !== "" && otherIncome !== null) {
        sumOther = sumOther + parseFloat(otherIncome);
      }
      if (honorAllowance !== "" && honorAllowance !== null) {
        sumOther = sumOther + parseFloat(honorAllowance);
      }
      if (serviceSubsidy !== "" && serviceSubsidy !== null) {
        sumOther = sumOther + parseFloat(serviceSubsidy);
      }
      return parseFloat(sumOther).toFixed(2);
    },
    //自动生成退休费
    resultH() {
      let resultA = this.resultA;
      let resultB = this.resultB;
      let resultC = this.resultC;
      let resultF = this.resultF;
      let resultG = this.resultG;
      let sum = 0;
      if (resultA !== "" && resultA !== null) {
        sum = sum + parseFloat(resultA);
      }
      if (resultB !== "" && resultB !== null) {
        sum = sum + parseFloat(resultB);
      }
      if (resultC !== "" && resultC !== null) {
        sum = sum + parseFloat(resultC);
      }
      if (resultF !== "" && resultF !== null) {
        sum = sum + parseFloat(resultF);
      }
      if (resultG !== "" && resultG !== null) {
        sum = sum + parseFloat(resultG);
      }
      return sum;
    },
    //增加机制补贴合计
    resultD() {
      let livingAllowanceNightysix = this.dataForm.livingAllowanceNightysix; //1996年增加生活补贴
      let livingAllowanceNightysev = this.dataForm.livingAllowanceNightysev; //1997年增加生活补贴
      let livingAllowanceNightyeig = this.dataForm.livingAllowanceNightyeig; //1998年增加生活补贴
      let livingAllowanceNightynig = this.dataForm.livingAllowanceNightynig; //1999年增加生活补贴
      let livingAllowanceZero = this.dataForm.livingAllowanceZero; //2000年增加生活补贴
      let livingAllowanceOne = this.dataForm.livingAllowanceOne; //2001年增加生活补贴
      let livingAllowanceTwo = this.dataForm.livingAllowanceTwo; //2002年增加生活补贴
      let livingAllowanceThird = this.dataForm.livingAllowanceThird; //2003年增加机制补贴
      let livingAllowanceFour = this.dataForm.livingAllowanceFour; //2004年增加机制补贴
      let sumMechanism = 0;
      if (livingAllowanceNightysix !== "" && livingAllowanceNightysix !== null) {
        sumMechanism = sumMechanism + parseFloat(livingAllowanceNightysix);
      }
      if (livingAllowanceNightysev !== "" && livingAllowanceNightysev !== null) {
        sumMechanism = sumMechanism + parseFloat(livingAllowanceNightysev);
      }
      if (livingAllowanceNightyeig !== "" && livingAllowanceNightyeig !== null) {
        sumMechanism = sumMechanism + parseFloat(livingAllowanceNightyeig);
      }
      if (livingAllowanceNightynig !== "" && livingAllowanceNightynig !== null) {
        sumMechanism = sumMechanism + parseFloat(livingAllowanceNightynig);
      }
      if (livingAllowanceZero !== "" && livingAllowanceZero !== null) {
        sumMechanism = sumMechanism + parseFloat(livingAllowanceZero);
      }
      if (livingAllowanceOne !== "" && livingAllowanceOne !== null) {
        sumMechanism = sumMechanism + parseFloat(livingAllowanceOne);
      }
      if (livingAllowanceTwo !== "" && livingAllowanceTwo !== null) {
        sumMechanism = sumMechanism + parseFloat(livingAllowanceTwo);
      }
      if (livingAllowanceThird !== "" && livingAllowanceThird !== null) {
        sumMechanism = sumMechanism + parseFloat(livingAllowanceThird);
      }
      if (livingAllowanceFour !== "" && livingAllowanceFour !== null) {
        sumMechanism = sumMechanism + parseFloat(livingAllowanceFour);
      }
      return parseFloat(sumMechanism).toFixed(2);
    },
  },

  methods: {
    
    test(id) {
      this.dataForm.id = id || 0;
      this.visible = true;
      this.$http({
        url: this.$http.adornUrl(
          `/jxxm/retiredemployees/info/${this.dataForm.id}`
        ),
        method: "get",
        params: this.$http.adornParams(),
      }).then(({ data }) => {
        if (data && data.code === 0) {
          this.dataForm.id = data.retiredEmployees.id;
          this.dataForm.areaCode = data.retiredEmployees.areaCode;
          this.dataForm.personalCode = data.retiredEmployees.personalCode;
          this.dataForm.name = data.retiredEmployees.name;
          this.dataForm.sex = data.retiredEmployees.sex;
          this.dataForm.nation = data.retiredEmployees.nation;
          this.dataForm.politicalFace = data.retiredEmployees.politicalFace;
          this.dataForm.idNo = data.retiredEmployees.idNo;
          this.dataForm.birthDate = data.retiredEmployees.birthDate;
          this.dataForm.workTime = data.retiredEmployees.workTime;
          this.dataForm.retirementTime =
            data.retiredEmployees.retirementTime;
          this.dataForm.retirementStatus =
            data.retiredEmployees.retirementStatus;
          this.dataForm.duties = data.retiredEmployees.duties;
          this.dataForm.county = data.retiredEmployees.county;
          this.dataForm.street = data.retiredEmployees.street;
          this.dataForm.community = data.retiredEmployees.community;
          this.dataForm.originalTroops =
            data.retiredEmployees.originalTroops;
          this.dataForm.handoverPeriod =
            data.retiredEmployees.handoverPeriod;
          this.dataForm.handoverTime = data.retiredEmployees.handoverTime;
          this.dataForm.handoverMode = data.retiredEmployees.handoverMode;
          this.dataForm.handoverBatch = data.retiredEmployees.handoverBatch;
          this.dataForm.workersClassification =
            data.retiredEmployees.workersClassification;
          this.dataForm.reception = data.retiredEmployees.reception;
          this.dataForm.myStatus = data.retiredEmployees.myStatus;
          this.dataForm.inOutTime = data.retiredEmployees.inOutTime;
          this.dataForm.deathTime = data.retiredEmployees.deathTime;
          this.dataForm.housingSituation =
            data.retiredEmployees.housingSituation;
          this.dataForm.housingPropertyRight =
            data.retiredEmployees.housingPropertyRight;
          this.dataForm.leaseholder = data.retiredEmployees.leaseholder;
          this.dataForm.housingArea = data.retiredEmployees.housingArea;
          this.dataForm.increasePension =
            data.retiredEmployees.increasePension;
          this.dataForm.totalMonthlyPension =
            data.retiredEmployees.totalMonthlyPension;
          this.dataForm.death = data.retiredEmployees.death;
          this.dataForm.workUnit = data.retiredEmployees.workUnit;
          this.dataForm.address = data.retiredEmployees.address;
          this.dataForm.phone = data.retiredEmployees.phone;
          this.dataForm.remarks = data.retiredEmployees.remarks;
          this.dataForm.workingYears = data.retiredEmployees.workingYears;
          this.dataForm.yuYue = data.retiredEmployees.yuYue;
          this.dataForm.workingYearsArmy =
            data.retiredEmployees.workingYearsArmy;
          this.dataForm.teachingAge = data.retiredEmployees.teachingAge;
          this.dataForm.wageLevel = data.retiredEmployees.wageLevel;
          this.dataForm.wageGrade = data.retiredEmployees.wageGrade;
          this.dataForm.wageScale = data.retiredEmployees.wageScale;
          this.dataForm.treatmentStandard =
            data.retiredEmployees.treatmentStandard;
          this.dataForm.personnelClassification =
            data.retiredEmployees.personnelClassification;
          this.dataForm.enjoyAllowance =
            data.retiredEmployees.enjoyAllowance;
          this.dataForm.specialAllowance =
            data.retiredEmployees.specialAllowance;
          this.dataForm.increaseProportion =
            data.retiredEmployees.increaseProportion;
          this.dataForm.renson = data.retiredEmployees.renson;
          this.dataForm.allowanceRatio =
            data.retiredEmployees.allowanceRatio;
          this.dataForm.postLevel = data.retiredEmployees.postLevel;
          this.dataForm.salary = data.retiredEmployees.salary;
          this.dataForm.isImprove = data.retiredEmployees.isImprove;
          this.dataForm.retirementFeeProportion =
            data.retiredEmployees.retirementFeeProportion;
          this.dataForm.senioritySalary =
            data.retiredEmployees.senioritySalary;
          this.dataForm.basicSalary = data.retiredEmployees.basicSalary;
          this.dataForm.levelSalary = data.retiredEmployees.levelSalary;
          this.dataForm.gradeSalary = data.retiredEmployees.gradeSalary;
          this.dataForm.salaryScale = data.retiredEmployees.salaryScale;
          this.dataForm.bonusAllowance =
            data.retiredEmployees.bonusAllowance;
          this.dataForm.serviceAllowance =
            data.retiredEmployees.serviceAllowance;
          this.dataForm.seniorityAllowance =
            data.retiredEmployees.seniorityAllowance;
          this.dataForm.totalSubsidy = data.retiredEmployees.totalSubsidy;
          this.dataForm.specialTeacherSubsidy =
            data.retiredEmployees.specialTeacherSubsidy;
          this.dataForm.difficultySubsidy =
            data.retiredEmployees.difficultySubsidy;
          this.dataForm.raiseWages = data.retiredEmployees.raiseWages;
          this.dataForm.retirementPayEightynine =
            data.retiredEmployees.retirementPayEightynine;
          this.dataForm.retirementPayNinetytwo =
            data.retiredEmployees.retirementPayNinetytwo;
          this.dataForm.retirementPayFirst =
            data.retiredEmployees.retirementPayFirst;
          this.dataForm.retirementPaySecond =
            data.retiredEmployees.retirementPaySecond;
          this.dataForm.retirementPayNinetyfive =
            data.retiredEmployees.retirementPayNinetyfive;
          this.dataForm.retirementPayNinetyseven =
            data.retiredEmployees.retirementPayNinetyseven;
          this.dataForm.retirementPayNinetysesec =
            data.retiredEmployees.retirementPayNinetysesec;
          this.dataForm.retirementPayNinetynine =
            data.retiredEmployees.retirementPayNinetynine;
          this.dataForm.retirementPayNinetynisec =
            data.retiredEmployees.retirementPayNinetynisec;
          this.dataForm.retirementPayZero =
            data.retiredEmployees.retirementPayZero;
          this.dataForm.retirementPayOne =
            data.retiredEmployees.retirementPayOne;
          this.dataForm.retirementPayOnenew =
            data.retiredEmployees.retirementPayOnenew;
          this.dataForm.retirementPayOnsec =
            data.retiredEmployees.retirementPayOnsec;
          this.dataForm.retirementPayThird =
            data.retiredEmployees.retirementPayThird;
          this.dataForm.retirementPayThisec =
            data.retiredEmployees.retirementPayThisec;
          this.dataForm.retirementPayFive =
            data.retiredEmployees.retirementPayFive;
          this.dataForm.retirementPaySix =
            data.retiredEmployees.retirementPaySix;
          this.dataForm.foodAllowanceSeventynine =
            data.retiredEmployees.foodAllowanceSeventynine;
          this.dataForm.foodAllowanceEightyeight =
            data.retiredEmployees.foodAllowanceEightyeight;
          this.dataForm.oilAllowanceNightyone =
            data.retiredEmployees.oilAllowanceNightyone;
          this.dataForm.oilAllowanceNightytwo =
            data.retiredEmployees.oilAllowanceNightytwo;
          this.dataForm.fuelLlowance = data.retiredEmployees.fuelLlowance;
          this.dataForm.meatLlowance = data.retiredEmployees.meatLlowance;
          this.dataForm.oilAllowanceNightythird =
            data.retiredEmployees.oilAllowanceNightythird;
          this.dataForm.livingAllowanceEightyfive =
            data.retiredEmployees.livingAllowanceEightyfive;
          this.dataForm.livingAllowanceEightyei =
            data.retiredEmployees.livingAllowanceEightyei;
          this.dataForm.livingAllowanceNightytw =
            data.retiredEmployees.livingAllowanceNightytw;
          this.dataForm.livingAllowanceNightyfo =
            data.retiredEmployees.livingAllowanceNightyfo;
          this.dataForm.livingAllowanceNightyfive =
            data.retiredEmployees.livingAllowanceNightyfive;
          this.dataForm.livingAllowanceNightysix =
            data.retiredEmployees.livingAllowanceNightysix;
          this.dataForm.livingAllowanceNightysev =
            data.retiredEmployees.livingAllowanceNightysev;
          this.dataForm.livingAllowanceNightyeig =
            data.retiredEmployees.livingAllowanceNightyeig;
          this.dataForm.livingAllowanceNightynig =
            data.retiredEmployees.livingAllowanceNightynig;
          this.dataForm.livingAllowanceZero =
            data.retiredEmployees.livingAllowanceZero;
          this.dataForm.livingAllowanceOne =
            data.retiredEmployees.livingAllowanceOne;
          this.dataForm.livingAllowanceTwo =
            data.retiredEmployees.livingAllowanceTwo;
          this.dataForm.livingAllowanceThird =
            data.retiredEmployees.livingAllowanceThird;
          this.dataForm.livingAllowanceFour =
            data.retiredEmployees.livingAllowanceFour;
          this.dataForm.livingAllowanceSeven =
            data.retiredEmployees.livingAllowanceSeven;
          this.dataForm.specialGoveAllowanc =
            data.retiredEmployees.specialGoveAllowanc;
          this.dataForm.paperMoney = data.retiredEmployees.paperMoney;
          this.dataForm.housingSubsidy =
            data.retiredEmployees.housingSubsidy;
          this.dataForm.bathSubsidy = data.retiredEmployees.bathSubsidy;
          this.dataForm.honorAllowance =
            data.retiredEmployees.honorAllowance;
          this.dataForm.otherIncome = data.retiredEmployees.otherIncome;
          this.dataForm.jobSubsidy = data.retiredEmployees.jobSubsidy;
          this.dataForm.ageAllowance = data.retiredEmployees.ageAllowance;
          this.dataForm.holidaySubsidy =
            data.retiredEmployees.holidaySubsidy;
          this.dataForm.retirementAllowanceOneo =
            data.retiredEmployees.retirementAllowanceOneo;
          this.dataForm.growthMechanismSubsidy =
            data.retiredEmployees.growthMechanismSubsidy;
          this.dataForm.workingYearsSubsidy =
            data.retiredEmployees.workingYearsSubsidy;
          this.dataForm.proportionalSubsidy =
            data.retiredEmployees.proportionalSubsidy;
          this.dataForm.retirementAllowanceOneth =
            data.retiredEmployees.retirementAllowanceOneth;
          this.dataForm.growthMechanismThirty =
            data.retiredEmployees.growthMechanismThirty;
          this.dataForm.retirementAllowanceThirty =
            data.retiredEmployees.retirementAllowanceThirty;
          this.dataForm.retirementPayFourty =
            data.retiredEmployees.retirementPayFourty;
          this.dataForm.logoutDate = data.retiredEmployees.logoutDate;
          this.dataForm.heatingSubsidy =
            data.retiredEmployees.heatingSubsidy;
          this.dataForm.serviceSubsidy =
            data.retiredEmployees.serviceSubsidy;
          this.dataForm.pensionSixteen =
            data.retiredEmployees.pensionSixteen;
          this.dataForm.pensionSeventeen =
            data.retiredEmployees.pensionSeventeen;
          this.dataForm.pensionEighteen =
            data.retiredEmployees.pensionEighteen;
          this.dataForm.pensionNineteen =
            data.retiredEmployees.pensionNineteen;
          this.dataForm.adjustTreatment =
            data.retiredEmployees.adjustTreatment;
          this.dataForm.basicPension = data.retiredEmployees.basicPension;
          this.dataForm.pensionTwenty = data.retiredEmployees.pensionTwenty;
          this.dataForm.pensionTwentyone =
            data.retiredEmployees.pensionTwentyone;
          this.dataForm.personType = data.retiredEmployees.personType;  
          this.dataForm.ext1 = data.retiredEmployees.ext1; 

          var rjkzpsrbz = '';
          var deDate = this.dataForm.deathTime;
          var deNian = parseInt(deDate.substring(0, 4));
          this.$http({
          url: this.$http.adornUrl('/jxxm/incomestandard/list'),
          method: 'get',
          params: this.$http.adornParams({
            // 'page': this.pageIndex,
            // 'limit': this.pageSize,
            'nd': deNian
            })
          }).then(({data}) => {
            if (data && data.code === 0) {
              
              this.dataList = data.page.list
              console.log(this.dataList)
              if(this.dataList.length == 0)
              {
                rjkzpsrbz = '';
              }else
              {
                rjkzpsrbz = this.dataList[0].rjkzpsrbz;
              }
              

              var deathTime = this.dataForm.deathTime;
              var deathNian = parseInt(deathTime.substring(0, 4));
              var deathMonth = parseInt(deathTime.substring(5, 7));

              var reVal = this.dataForm.retirementTime;
              var txqsf = this.dataForm.retirementStatus;
              var dybz = this.dataForm.treatmentStandard;
              var nian = parseInt(reVal.substring(0, 4));
              var month = parseInt(reVal.substring(5, 7));

              let txfjfbl = this.dataForm.retirementFeeProportion;//退休费计发比例
              let tgblbf = this.dataForm.increaseProportion;//提高比例部分
              let gzsftg = this.dataForm.isImprove//工资是否提高10%
              let gzsftgValue = '';
              if(txfjfbl === null || txfjfbl === "")
              {
                txfjfbl = 0;
              }
              if(tgblbf === null || tgblbf === "")
              {
                tgblbf = 0;
              }
              if(gzsftg == "是")
              {
                  gzsftgValue = 10;
              }else{
                gzsftgValue = 0
              }
              txfjfbl = parseFloat(txfjfbl)+parseFloat(tgblbf)+parseFloat(gzsftgValue);

              //退休费基数重新计算
              let senioritySalary = this.dataForm.senioritySalary; //工龄工资
              let basicSalary = this.dataForm.basicSalary; //基础工资

              let gradeSalary = this.dataForm.gradeSalary; //岗位工资(标准工资)
              let serviceAllowance = this.dataForm.serviceAllowance; //军队服务津贴
              let levelSalary = this.dataForm.levelSalary; //级别工资
              let bonusAllowance = this.dataForm.bonusAllowance; //奖金津贴
              let sumBasicRe = 0;

              if (serviceAllowance !== "" && serviceAllowance !== null) {
                sumBasicRe = sumBasicRe + parseFloat(serviceAllowance);
              }
              if (gradeSalary !== "" && gradeSalary !== null) {
                sumBasicRe = sumBasicRe + parseFloat(gradeSalary);
              }
              if (levelSalary !== "" && levelSalary !== null) {
                sumBasicRe = sumBasicRe + parseFloat(levelSalary);
              }
              if (bonusAllowance !== "" && bonusAllowance !== null) {
                sumBasicRe = sumBasicRe + parseFloat(bonusAllowance);
              }
              let bl = parseFloat(txfjfbl)/100;
              sumBasicRe = sumBasicRe * bl;

              if (basicSalary !== "" && basicSalary !== null) {
                sumBasicRe = sumBasicRe + parseFloat(basicSalary);
              }
              if (senioritySalary !== "" && senioritySalary !== null) {
                sumBasicRe = sumBasicRe + parseFloat(senioritySalary);
              }
              
              let newResultA = Math.ceil(sumBasicRe)

              var resultA = newResultA;
              var zwbt = this.dataForm.totalSubsidy;
              this.dataForm.sumTxfjs = parseFloat(resultA) + parseFloat(zwbt)
              

              //重新计算历次增加的退休费合计
              var resultB = this.resultB;
              var zjtxfR = this.dataForm.retirementPayZero;
              this.dataForm.lczjtxfhjsl = parseFloat(resultB)+parseFloat(zjtxfR);
              

              //重新计算价格生活补贴合计
              this.dataForm.jgshbthjsl = 0;
            

              //重新计算退休费合计
              var resultD = this.resultD;
              this.dataForm.zdsctxfsl = parseFloat(this.dataForm.sumTxfjs)+parseFloat(this.dataForm.lczjtxfhjsl)+parseFloat(resultD)+parseFloat(this.dataForm.jgshbthjsl);

              //抚恤金合计
              this.dataForm.fxjSum = parseFloat(this.dataForm.zdsctxfsl)*20 + 5000;

              //转大写
              var money = this.dataForm.fxjSum;
              var cnNums = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖']
              var cnIntRadice = ['', '拾', '佰', '仟']
              var cnIntUnits = ['', '万', '亿', '兆']
              var cnDecUnits = ['角', '分', '毫', '厘']
              var cnInteger = '整'
              var cnIntLast = '元'
              var maxNum = 999999999999999.9999
              var integerNum
              var decimalNum
              var chineseStr = ''
              var parts
              if (money === '') {
                return ''
              }
              money = parseFloat(money)
              if (money >= maxNum) {
                return ''
              }
              if (money === 0) {
                chineseStr = cnNums[0] + cnIntLast + cnInteger
                return chineseStr
              }
              money = money.toString()
              if (money.indexOf('.') === -1) {
                integerNum = money
                decimalNum = ''
              } else {
                parts = money.split('.')
                integerNum = parts[0]
                decimalNum = parts[1].substr(0, 4)
              }
              if (parseInt(integerNum, 10) > 0) {
                var zeroCount = 0
                var IntLen = integerNum.length
                for (var i = 0; i < IntLen; i++) {
                  var n = integerNum.substr(i, 1)
                  var p = IntLen - i - 1
                  var q = p / 4
                  var m = p % 4
                  if (n === '0') {
                    zeroCount++
                  } else {
                    if (zeroCount > 0) {
                      chineseStr += cnNums[0]
                    }
                    zeroCount = 0
                    chineseStr += cnNums[parseInt(n)] + cnIntRadice[m]
                  }
                  if (m === 0 && zeroCount < 4) {
                    chineseStr += cnIntUnits[q]
                  }
                }
                chineseStr += cnIntLast
              }
              if (decimalNum !== '') {
                var decLen = decimalNum.length
                for (i = 0; i < decLen; i++) {
                  n = decimalNum.substr(i, 1)
                  if (n !== '0') {
                    chineseStr += cnNums[Number(n)] + cnDecUnits[i]
                  }
                }
              }
              if (chineseStr === '') {
                chineseStr += cnNums[0] + cnIntLast + cnInteger
              } else if (decimalNum === '') {
                chineseStr += cnInteger
              }
              this.dataForm.dx = chineseStr
            }
          })
        }
      });
       
      
    },
    printHandle() {
      html2canvas(this.$refs.exportPdf, {
        backgroundColor: null,
        useCORS: true,
        windowHeight: document.body.scrollHeight
      }).then(canvas => {
        const url = canvas.toDataURL()
        this.img = url
        printJS({
          printable: url,
          type: 'image',
          documentTitle: ''
        })
      })
    },
    
  },
};
</script>

<style scoped lang="scss">
$titleColor: rgb(117, 117, 117);
$borderColor: 1px solid #e9e9e9;
.title {
  width: 100%; // 1200px
  margin: 0 auto;
  margin-top: 1px;
  padding: 1px 0;
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  //background-color: #e1e1e1;
  // border: 1px solid #e1e1e1;
}
.title1 {
  width: 100%; // 1200px
  margin-left:10px;
  margin-top: 5px;
  padding: 1px 0;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  //background-color: #e1e1e1;
  // border: 1px solid #e1e1e1;
}
.title2 {
  width: 50%; // 1200px
  margin-left:1200px;
  margin-top: 5px;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  // text-align: center;
  //background-color: #e1e1e1;
  // border: 1px solid #e1e1e1;
}
.cont {
  border-right: $borderColor;
}
.table {
  width: 100%; // 1200px
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.lump {
  width: 20%;
}
.lump2 {
  width: 40%;
}
.lump2:nth-child(3),
.lump2:nth-child(6),
.lump2:last-child {
  width: 20%;
}
.box {
  width: 100%;
  height: 38px;
  display: flex;
  border-top: $borderColor;
  .content1 {
    width: 40%;
    height: 38px;
    line-height: 38px;
    text-align: center;
    background-color: #fafafa;
    border-left: $borderColor;
    border-bottom: $borderColor;
    color: $titleColor;
    font-size: 14px;
  }
  .content2 {
    width: 60%;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background-color: #fff;
    border-left: $borderColor;
    
    border-bottom: $borderColor;
    color: 000;
    font-size: 14px;
    cursor: pointer;
    overflow: hidden; //超出的文本隐藏
    text-overflow: ellipsis; //溢出用省略号显示
    white-space: nowrap; //溢出不换行
  }
  .content4 {
    width: 100%;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background-color: #fafafa;
    border-left: $borderColor;
    
    border-bottom: $borderColor;
    color: $titleColor;
    font-size: 14px;
  }
  // .content2:last-child {
  //   border-right: $borderColor;
  // }
  .content_border {
    width: 60%;
    height: 38px;
    line-height: 38px;
    text-align: center;
    background-color: #fff;
    border-left: $borderColor;
    
    border-bottom: $borderColor;
    color: 000;
    font-size: 14px;
    cursor: pointer;
    // overflow: hidden; //超出的文本隐藏
    //text-overflow: ellipsis; //溢出用省略号显示
    //white-space: nowrap; //溢出不换行
  }
  .content_border1 {
    width: 100%;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background-color: #fff;
    border-left: $borderColor;
    
    border-bottom: $borderColor;
    color: 000;
    font-size: 14px;
    cursor: pointer;
    overflow: hidden; //超出的文本隐藏
    text-overflow: ellipsis; //溢出用省略号显示
    white-space: nowrap; //溢出不换行
  }
}
// 三列样式
.content3 {
  width: 100%;
  height: 40px;
  display: inline-block;
  line-height: 40px;
  text-align: center;
  background-color: #fff;
  border: $borderColor;
  border-right: none;
  color: 000;
  font-size: 14px;
  font-weight: 600;
}
// 四列样式
.lump4 {
  width: 100%;
  display: flex;
  // align-items: center;
  flex-wrap: wrap;
  box-sizing: border-box;
  border: $borderColor;
  border-top: none;
  border-right: none;
  .conttent4 {
    display: flex;
    align-items: center;
    width: calc(48% - 1px);
    height: 40px;
    line-height: 40px;
    border-right: $borderColor;
    background-color: #fff;
    text-align: left;
    cursor: pointer;
    white-space: nowrap; //溢出不换行
    &-title {
      color: $titleColor;
      padding-left: 12px;
    }
    &-txt {
      overflow: hidden; //超出的文本隐藏
      text-overflow: ellipsis; //溢出用省略号显示
      white-space: nowrap; //溢出不换行
    }
  }
  .conttent5 {
    display: flex;
    align-items: center;
    width: 52%;
    height: 40px;
    line-height: 40px;
    text-align: left;
    background-color: #fff;
    cursor: pointer;
    white-space: nowrap;
    &-title {
      padding-left: 12px;
      color: $titleColor;
    }
    &-txt {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
  }
  .conttent6 {
    width: calc(48% - 1px);
    min-height: 100px;
    text-align: left;
    // border-right: $borderColor;
    background: #fff;
    border-top: none;
    cursor: pointer;
    // white-space: nowrap;
    &-title {
      color: $titleColor;
      padding: 12px;
    }
    &-txt {
      padding: 0 12px;
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
    }
    // 评价
    &-score {
      padding: 12px;
      &-title {
        color: $titleColor;
      }
      &-affirm {
        padding: 12px;
        padding-left: 0;
        ::v-deep .el-col {
          padding-bottom: 12px;
        }
        ::v-deep .el-col:last-child {
          padding-bottom: 0;
        }
      }
    }
  }
  .conttent7 {
    width: calc(52% - 30px);
    min-height: 100px;
    text-align: left;
    background: #fff;
    border-left: $borderColor;
    
    cursor: pointer;
    &-title {
      color: $titleColor;
      padding: 12px;
    }
    &-txt {
      padding: 0 12px;
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
    }
    // 签名
    &-sign {
      display: flex;
      align-items: center;
      padding: 12px;
      &-title {
        color: $titleColor;
      }
    }
  }
  .content11 {
    width: 10%;
    height: 120px;
    line-height: 40px;
    text-align: center;
    background-color: #fafafa;
    border-left: $borderColor;
    
    border-bottom: $borderColor;
    color: $titleColor;
    font-size: 14px;
  }
}
</style>